System for dynamically managing power consumption in a search engine

ABSTRACT

The power consumption of a search engine such as a CAM device is dynamically adjusted to prevent performance degradation and/or damage resulting from overheating. For some embodiments, the CAM device is continuously sampled to generate sampling signals indicating the number of active states and number of compare operations performed during each sampling period. The sampling signals are accumulated to generate an estimated device power profile, which is compared with reference values corresponding to predetermined power levels to generate a dynamic power control signal indicating predicted increases in the device&#39;s operating temperature resulting from its power consumption. The dynamic power control signal is then used to selectively reduce the input data rate of the CAM device, thereby reducing power consumption and allowing the device to cool.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation application and claims the benefitunder 35 USC 120 of the commonly owned U.S. patent application Ser. No.12/822,073 entitled “System For Dynamically Managing Power Consumptionin a Search Engine” filed on Jun. 23, 2010 now U.S. Pat. No. 8,031,503,the entirety of which is incorporated by reference herein.

TECHNICAL FIELD

The present invention relates generally to integrated circuits andspecifically to managing power consumption of integrated circuits.

BACKGROUND OF RELATED ART

Content addressable memory (CAM) devices are frequently used in networkswitching and routing applications to determine forwarding destinationsfor data packets, and are also used to provide more advanced networkQuality of Service (QoS) functions such as traffic shaping, trafficpolicing, rate limiting, and so on. More recently, CAM devices have beendeployed in network environments to implement intrusion detectionsystems and to perform deep packet inspection tasks. For example, a newclass of CAM device has been developed that can perform complex regularexpression search operations.

More specifically, a CAM device includes a CAM array having a pluralityof CAM cells organized in a number of rows and columns. Each row of CAMcells, which can be used to store a CAM word, is coupled to acorresponding match line that indicates match results for the row. Eachcolumn of CAM cells is typically coupled to one or more data lines ordata line pairs that can be used to drive data into a selected CAM rowduring write operations and/or for providing a search key to the CAMrows during compare operations. During a compare operation, the searchkey (e.g., the comparand word) is provided to the CAM array and comparedwith the CAM words stored therein. For each CAM word that matches thesearch key, a corresponding match line is asserted to indicate the matchresult, which is typically stored in a match latch associated with thematching CAM row. If one or more of the match lines are asserted, amatch flag is asserted to indicate the match condition, and a priorityencoder determines the match address or index of the highest prioritymatching (HPM) entry in the CAM array.

Advances in CAM architectures and semiconductor process technologieshave significantly increased storage density and data throughput.However, as storage density and data throughput increase, so do powerconsumption and heat generation. Indeed, thermal constraints haveemerged as a potentially limiting factor in achieving even greaterstorage densities and data speeds. In networking environments, numerousfactors such as packet size and packet content can impact theperformance and power consumption of CAM devices deployed therein. Forexample, the specific contents of a packet can influence both powerconsumption and data speeds, and therefore the power consumptionassociated with processing packets of the same size can differ basedupon various content-specific processing requirements.

To avoid spikes in power consumption that can damage network componentsdue to overheating, network architects typically design content searchsystems based upon a predicted worst-case combination of packet size andcontent processing needs, for example, by limiting maximum data speeds.However, limiting data speeds of network components in a static mannerbased upon rarely occurring worst-case scenarios undesirably degradesperformance.

The power consumption of CAM devices tasked with network routingfunctions (e.g., address look-ups for performing next-hop functions) isrelatively predictable because the search keys and configuration of theCAM device vary little, and therefore designing such systems for theworst-case scenario has been acceptable to prevent device overheating.However, the power consumption of more advanced CAM devices deployed inregular expression search operations is relatively unpredictable becausethe packet contents and configuration of the CAM device can varysignificantly. For example, the advanced CAM device disclosed in U.S.Pat. No. 7,643,353, which is assigned to the assignee of the presentdisclosure, includes a CAM array having counters and a programmableinterconnect structure (PRS) that allow for the storage and searching ofcomplex regular expressions having various metacharacters, quantifiers,and/or character classes. More specifically, the PRS can be configuredto selectively route the match signal from each CAM row as an inputmatch signal to itself and/or to any number of other arbitrary selectedCAM rows and counter circuits at the same time, and allows the CAM arrayto store and implement non-deterministic finite automaton (NFA) thatembody the complex regular expressions. Thus, the power consumption ofsuch CAM devices depends not only upon the specific configuration of thePRS but also upon the sequence of input characters provided to the CAMarray because of the capacitive loading associated with the PRS and thevarious match lines it may activate during search operations. As aresult, conventional approaches to avoid device overheating that usestatic predictions of a worst-case scenario are insufficient toeffectively balance performance and power consumption of such advancedCAM devices.

Accordingly, there is a need to improve the manner in which powerconsumption of CAM devices is managed.

BRIEF DESCRIPTION OF THE DRAWINGS

The present embodiments are illustrated by way of example and notintended to be limited by the figures of the accompanying drawings,where:

FIG. 1 is a functional block diagram of a search system in accordancewith some of the present embodiments;

FIG. 2 is a functional block diagram of a content addressable memory(CAM) device in accordance with some embodiments of FIG. 1;

FIG. 3 is a block diagram of a portion of one embodiment of the CAMdevice of FIG. 2;

FIG. 4A is a block diagram of one embodiment of the power estimatorcircuit of FIG. 1;

FIG. 4B is a block diagram of another embodiment of the power estimatorcircuit of FIG. 1;

FIG. 4C is a block diagram of yet another embodiment of the powerestimator circuit of FIG. 1;

FIG. 5 is an illustrative flow chart depicting an exemplary powermanagement operation in accordance with some embodiments;

FIG. 6A is a block diagram of a portion of another embodiment of the CAMdevice of FIG. 2;

FIG. 6B is a block diagram of a portion of yet another embodiment of theCAM device of FIG. 2;

FIG. 7 is a block diagram of a portion of still another embodiment ofthe CAM device of FIG. 2;

FIG. 8 is an illustrative flow chart depicting an exemplary operationfor reading state information from the CAM array to the sampling circuitin accordance with some embodiments;

FIG. 9 is a circuit diagram of one embodiment of the CAM array of FIG.7;

FIG. 10A shows a circuit diagram of one embodiment of the pass gate ofFIG. 9;

FIG. 10B shows another embodiment of the save state and restore readcircuit of FIG. 9;

FIG. 11A shows a circuit diagram of a portion of another embodiment ofthe CAM array of FIG. 7;

FIG. 11B shows a functional block diagram of a portion of yet anotherembodiment of the CAM array of FIG. 7; and

FIG. 12 shows a simplified block diagram of another embodiment of theCAM array of FIG. 3.

Like reference numerals refer to corresponding parts throughout thedrawing figures.

DETAILED DESCRIPTION

A method and apparatus for dynamically managing and adjusting the powerconsumption of search engines are described below in the context of CAMdevices. However, present embodiments are equally applicable fordynamically managing and adjusting power consumption in other types ofsearch engines and IC devices. In the following description, forpurposes of explanation, specific nomenclature is set forth to provide athorough understanding of the present invention. However, it will beapparent to one skilled in the art that these specific details may notbe required to practice the present invention. In other instances,well-known circuits and devices are shown in block diagram form to avoidobscuring the present invention unnecessarily. Additionally, theinterconnection between circuit elements or blocks may be shown as busesor as single signal lines. Each of the buses may alternatively be asingle signal line, and each of the single signal lines mayalternatively be a bus. Further, the logic levels assigned to varioussignals in the description below are arbitrary, and therefore may bemodified (e.g., reversed polarity) as desired. As used herein, the term“match signals” refers to signals generated on the match lines of a CAMarray during compare operations that indicate the match results ofcorresponding rows of the CAM array. The match signals are sometimesreferred to as match states or state information, and thus the terms“match signals,” “match states,” and “state information” areinterchangeable in the following description. Accordingly, the presentembodiments are not to be construed as limited to specific examplesdescribed herein but rather includes within its scope all embodimentsdefined by the appended claims.

Present embodiments dynamically adjust the power consumption of a searchengine such as a CAM device to prevent performance degradation and/ordamage resulting from overheating. For some embodiments, the stateinformation and compare information generated in the CAM device iscontinuously sampled during normal device operation to generate samplingsignals indicating the number of active states and the number of compareoperations performed during each of a plurality of sampling periods. Thesampling signals are then accumulated over a period of time to generatean estimated device power profile, which is then compared with one ormore reference values corresponding to various predetermined powerlevels to generate a dynamic power control signal indicating predictedincreases in the device's operating temperature resulting from its powerconsumption. The dynamic power control signal is then used toselectively reduce the input data rate of the CAM device, therebyreducing power consumption and allowing the operating temperature todecrease to an acceptable level that will not degrade performance orresult in damage to the device.

FIG. 1 shows a search system 100 within which the present embodimentsmay be implemented. Search system 100 includes a search engine 110, apower estimator circuit 120, and a throttle control circuit 130. Searchengine 110 compares an input string with a number of stored patterns togenerate a match results (RST). Further, in accordance with presentembodiments, search engine 110 includes a sampling circuit (not shown inFIG. 1 for simplicity) that generates sampling signals representative ofthe power consumption of the search engine. For some embodiments, thesampling signals indicate how many active states are generated during asampling period and/or indicate the number of compare operationsperformed in the search engine 110 during the sampling period. For otherembodiments, the sampling signals may also include other operationalcharacteristics of the search engine 110.

The power estimator circuit 120 includes an input to receive thesampling signals from search engine 110, and in response theretogenerates a dynamic power control signal (CTR_DP) that is indicative oftemperature increases resulting from a time-averaged power consumptionof the search engine 110. For some embodiments, the power estimatorcircuit 120 accumulates the sampling signals provided by the searchengine 110 to generate a moving average power profile of search engine110 that can be used to predict temperature increases in search engine110 resulting from its power consumption.

The throttle control circuit 130 has an input to receive an input string(e.g., incoming packets) from an input source (e.g., a blade or linecard of a router or other network device), has an output to providesearch keys (SK) extracted from the input string to search engine 110,and has a control port to receive the dynamic power control signal(CTR_DP) from the power estimator circuit 120. As explained in moredetail below, throttle control circuit 130 selectively adjusts the rateat which the input string (e.g., search keys) are provided to searchengine 110 in response to CTR_DP to dynamically adjust the powerconsumption of search engine 110. For example, when CTR_DP indicatesthat the search engine is consuming a sustained level of power thatcould result in damage due to overheating, throttle control circuit 130can decrease the rate at which input data is provided to search engine110 to decrease power consumption, thereby allowing the search engine tocool down to avoid overheating. Then, after power consumption levelshave subsided long enough to decrease the operating temperature ofsearch engine 110 to an acceptable (e.g., safe) level, throttle controlcircuit 130 can increase the input data rate to maximize performance.

In this manner, the throttle control circuit 130 can dynamically adjustthe power consumption of search engine 110 by changing the input datarate of search engine 110 in response to a moving average power profileof the search engine, thereby allowing search engine 110 to operate at amaximum speed while the operating temperature is in a safe zone andallowing search engine 110 to operate at a reduced speed when theoperating temperature begins approaching an unsafe zone. This is inmarked contrast to prior power management techniques that shut down oneor more portions (e.g., array blocks) of the search engine upondetecting an unacceptable increase in operating temperature.

For some embodiments, throttle control circuit 130 includes a pluralityof first-in, first-out (FIFO) storage locations that store search keyswaiting to be provided to search engine 130, and is configurable toadjust the input data rate of the search engine by altering (e.g.,delaying) the rate at which the FIFO locations are enabled to outputcorresponding search keys to the search engine 110.

For exemplary embodiments described herein, search engine 110 is aCAM-based search engine, although for alternate embodiments other searchengines may be used. For example, FIG. 2 shows a CAM device 200 that isone embodiment of search engine 110. CAM device 200 includes a CAM array210, an address decoder 220, a comparand register 230, a read/writecircuit 240, a priority encoder circuit 250, match logic 260, a samplingcircuit 270, and a sampling control circuit 280. CAM array 210 includesany number of rows of CAM cells (not shown for simplicity in FIG. 2),where each row of CAM cells can be configured to store a data word. TheCAM cells can be any suitable type of CAM cell including, for example,binary CAM cells, ternary CAM cells, and/or quaternary CAM cells.Further, while CAM array 210 is shown in FIG. 2 as a single CAM array,it may include any number of CAM array blocks that can be independentlysearched.

For some embodiments, CAM array 210 is of the type described incommonly-owned U.S. Pat. No. 7,643,353, which is incorporated byreference herein. For CAM arrays of the type described in U.S. Pat. No.7,643,353, the rows of CAM cells are each selectively connected to aprogrammable routing structure (PRS) that can be configured toselectively route the match signal from any CAM row as an input matchsignal to itself and/or to any number of other arbitrarily selected CAMrows at the same time. The CAM array may also include a number ofcounter circuits that can be selectively connected to each other and/orto any number of the CAM rows by the PRS. In this manner, CAM arrays ofthe type disclosed in U.S. Pat. No. 7,643,353 can be configured toimplement search operations for complex regular expressions havingvarious metacharacters, quantifiers, and/or character classes.

More specifically, to store a complex regular expression in the CAMarray disclosed in U.S. Pat. No. 7,643,353, the CAM array's PRS isprogrammed to implement a non-deterministic finite automaton (NFA) thatembodies the complex regular expression, thereby mapping the NFA intothe CAM array hardware. During search operations, the logic states ofthe match lines are indicative of the states of the corresponding NFA(e.g., where an asserted match line indicates that the correspondingstate of the NFA is active, and a de-asserted match line indicates thatthe corresponding state of the NFA is inactive). In this manner, thematch results stored in the CAM array's match latches can be used toindicate whether corresponding states of the NFA are active or inactive,thereby providing current state information for the NFA during searchoperations.

One or more instructions and related control signals may be provided toCAM device 200 from an instruction decoder (not shown for simplicity) tocontrol read, write, compare, and other operations for CAM device 200.Other well-known signals that can be provided to CAM device 200, such asenable signals, clock signals, and power connections, are not shown forsimplicity. Further, although not shown in FIG. 2, each row of CAM cellsin CAM array 210 may have one or more validity bits to indicate whetherthe corresponding row (or any segment thereof) of CAM cells stores validdata. In addition, for some embodiments, the rows in CAM array 210 canbe divided into a plurality of row segments, for example, to reduce thecapacitive loading for each row or to provide multiple width/depthconfigurations for the array.

Each row of CAM cells (not shown in FIG. 2 for simplicity) in CAM array210 is coupled to address decoder 220 via a corresponding word line WL,and to priority encoder 250 and match logic 260 via a correspondingmatch line ML. For simplicity, the word lines and match lines arerepresented collectively in FIG. 2. Address decoder 220 is well-known,and includes circuitry to select corresponding rows in CAM array 210 forread, write, and/or other operations in response to an address receivedfrom an address bus ABUS using the word lines WL. For other embodiments,addresses may be provided to address decoder 220 from another suitablebus and/or circuitry.

The match lines ML provide match results for compare operations betweencomparand data (e.g., a search key) and data stored in CAM array 210.Priority encoder 250, which is well-known, uses the match resultsindicated on the match lines to determine the matching entry that hasthe highest priority number associated with it and generates the indexor address of this highest priority match (HPM). In addition, priorityencoder 250 may use the validity bits from CAM array 210 to generate thenext free address that is available in CAM array 210 for storing newdata. Although not shown in FIG. 2, for some embodiments, priorityencoder 250 may provide the next free address to the address decoder220.

Match logic 260, which is well-known, uses the match results indicatedon the match lines to generate a match flag (MF) indicative of a matchcondition in CAM array 210. If there is more than one matching entry inCAM array 210, match logic 260 may generate a multiple match flag toindicate a multiple match condition. In addition, match logic 260 mayuse the validity bits from CAM array 210 to assert a full flag when allof the rows of CAM cells in CAM array 210 are filled with valid entries.

Each column of CAM cells (not shown in FIG. 2 for simplicity) in CAMarray 210 is coupled to comparand register 230 via one or morecorresponding comparand lines CL, and is coupled to read/write circuit240 via one or more corresponding bit lines BL. For simplicity, thecomparand lines CL and bit lines BL are represented collectively in FIG.2. Comparand register 230 is well-known, and is configured to provide asearch key (e.g., a comparand word) received from a comparand bus CBUSto CAM array 210 during compare operations with data stored therein. Forother embodiments, the search key can be provided to CAM array 210 viaanother bus and/or circuit. Read/write circuit 240 includes well-knownwrite drivers to write data received from a data bus DBUS to CAM array210 via the bit lines, and includes well-known sense amplifiers to readdata from CAM array 210 onto DBUS. For other embodiments, read/writecircuit 240 may be coupled to a bus other than DBUS. Further, althoughnot shown in FIG. 2 for simplicity, CAM device 200 can include awell-known global mask circuit (e.g., coupled to the comparand register230) that can selectively mask the bits of the search key provided tothe CAM array 210.

CAM array 210 also includes a plurality of match latches 212. Each matchlatch 212 is coupled to the match line ML of a corresponding row of CAMcells, and is used to store the match signal or state of thecorresponding CAM row during compare operations. For embodiments of CAMarray 210 configured according to U.S. Pat. No. 7,643,353, the matchstates stored in the match latches 212 are indicative of correspondingstates of the NFA(s) embodied by data stored in CAM array 210. In thismanner, the match state information stored in the match latches 212 canbe used to indicate whether each state of the NFA is active or inactive.

Sampling circuit 270, which can be any suitable sampling circuit, isshown in FIG. 2 as having a first input to receive match signals (MS)from match latches 212, a second input to receive compare information(CMP) from CAM array 210, and an output to generate the sampling signalsindicative of the power consumption of the CAM array 210. For theexemplary embodiment shown in FIG. 2, the sampling signals generated bysampling circuit 270 indicate how many active states are generatedduring a sampling period, and may indicate how many compare operationsare performed during the sampling period. For one such embodiment,sampling circuit 270 includes a first counter circuit (not shown forsimplicity) that counts the number of asserted match signals (e.g., thenumber of active states) reported from CAM array 210 during the samplingperiod, includes a second counter circuit (not shown for simplicity)that counts the number of compare operations performed during thesampling period, a third counter to count the number of clock cycles ofthe sampling period, and logic to combine the input data (e.g., numberof active states, number of compare operations, and number of clockcycles of the sampling period) to generate the sampling signals.

The state information can be provided from the match latches 212 and/orCAM array 210 to sampling circuit 270 by any suitable circuit or usingany suitable technique. For one embodiment, a suitable control circuitsuch as a state machine (not shown in FIG. 2 for simplicity)continuously scans the match latches 212 for the state informationduring normal operation of the CAM device (e.g., during compareoperations performed by CAM array 210), and reports the scanned stateinformation to sampling circuit 270. For another embodiment, the matchlatches 212 continuously output the state information stored therein tosampling circuit 270 during normal operation of the CAM device viadedicated signal lines or a bus, for example, as described below withrespect to FIGS. 6A-6B. For yet another embodiment, the match latches212 continuously output the state information stored therein to samplingcircuit 270 during normal operation of the CAM device in parallel usingdedicated read circuitry connected to the CAM array's bit lines, forexample, as described below with respect to FIGS. 7-9.

The compare information (CMP) can be provided from the CAM array 210 tothe sampling circuit 270 by any suitable circuit or technique. For oneembodiment, comparand register 230 or another suitable circuit canprovide compare enable signals (e.g., that enable compare operations tobe performed in CAM array 210) as CMP to sampling circuit 270 duringnormal operation of the CAM device 200. For another embodiment, thecomparand lines can be monitored to detect occurrence of each compareoperation and report the resulting compare information to samplingcircuit 270.

FIG. 3 shows a portion of a CAM device 300 that is one embodiment of theCAM device 200 of FIG. 2. CAM device 300 is shown to include a CAM array310, comparand register 230, read/write circuit 240, priority encoder250, sampling circuit 270, and a sampling control circuit 280. Otherwell-known components of CAM device 300 are not shown for simplicity.CAM array 310, which is one embodiment of CAM array 210 of FIG. 2,includes a plurality of CAM cells 312 arranged in a number of rows andcolumns, and includes a number of match latches 320(1)-320(n). Each rowof CAM cells 312 is coupled to address decoder 220 via a correspondingword line WL, and is coupled to an associated match latch 320 via acorresponding match line ML. The word lines are selectively driven byaddress decoder 220 in response to an address (ADDR) to select one ormore of rows of CAM cells 312 for writing or reading in a well-knownmanner. The match lines ML indicate match results of a compare operationperformed in CAM array 310. The match latches 320, which can be anysuitable register, latch, flip-flop, SRAM cell, DRAM cell, or othermemory element, store the match results provided on the match lines ML,and are coupled to corresponding inputs of priority encoder 250.Although not shown for simplicity, for some embodiments, each matchlatch 320 can include a clock input to receive a match latch signal thatcauses the match latches 320 to latch the match signals provided on thematch lines ML. Together, match latches 320 form one embodiment of matchlatches 212 of FIG. 2.

For exemplary embodiments described herein, the match lines ML arepre-charged to logic high (e.g., VDD) for compare operations, and if allCAM cells 312 in a row match the search key, the row's match line MLremains in its charged state to indicate the match condition.Conversely, if one or more CAM cell 312 in the row does not match thesearch key, those CAM cell(s) 312 discharge the match line ML towardground potential (e.g., logic low) to indicate the mismatch condition.

Each column of CAM cells 312 is coupled to the comparand register 230via a complementary comparand line pair CL/ CL, and to the read/writecircuit 240 via a complementary bit line pair BL/ BL. The comparandregister 230 includes a plurality of drivers (not shown for simplicity)that provide complementary comparand data to columns of CAM cells 312during compare or search operations via the comparand line pairs CL/ CL.Although the comparand data present on a comparand line pair isgenerally referred to herein as being complementary comparand signals, acomparand line pair CL/ CL may be driven to the same logic state (e.g.,logic low or high) to mask compare operations within an entire column ofthe CAM array 310. The read/write circuit 240 provides/receivescomplementary CAM data to/from the columns of CAM cells 312 via the bitline pairs BL/ BL. More specifically, read/write circuit 240 includes aplurality of well-known sense amplifiers (not shown for simplicity) toread data read from the bit line pairs BL/ BL, and includes a pluralityof well-known write drivers (not shown for simplicity) to write datainto the CAM array 310 via the bit line pairs BL/ BL.

For other embodiments, the complementary comparand lines CL/ CL may bereplaced by single-ended comparand lines, and/or the complementary bitlines BL/ BL may be replaced by single-ended bit lines. In addition, forother embodiments, the comparand lines can be omitted, and the bit linescan be used to provide comparand data to the CAM array for compareoperations. For alternate embodiments, encoded comparand data can beprovided to the CAM array for search operations, for example, asdescribed in commonly-owned U.S. Pat. No. 7,133,312, which isincorporated by reference herein.

For the exemplary embodiment of FIG. 3, the sampling circuit 270includes a first input to receive match states (MS) from the matchlatches 320, a second input to receive compare enable signals (CMP) fromcomparand register 230, and an output to generate the sampling signals.For some embodiments, the compare signal CMP is asserted uponcommencement of each compare operation in CAM array 310. For anotherembodiment, CMP can be generated by another suitable circuit withinand/or associated with CAM array 310.

Sampling control circuit 280 is coupled to match latches 320 and isconfigured to generate one or more sampling control signals CTR_SMP thatcause state information stored in or associated with match latches 320to be forwarded to sampling circuit 270 during normal operation (e.g.,during compare operations) of CAM device 300. In this manner, thesampling control circuit 280 continuously scans the match latches forstate information and reports the state information to sampling circuit270 without disturbing or interfering with search operations in the CAMarray. For some exemplary embodiments described herein, the stateinformation for the entire CAM array is provided continuously at thesame time to sampling circuit 270.

However, because of limited signal routing resources in CAM device 300,sampling control circuit 280 is, for some actual embodiments, configuredto sequentially scan the state information associated with each of aplurality of row groups in a plurality of corresponding samplingperiods. For such embodiments, the N rows CAM array 310 are grouped intoP groups of M rows, where N=P*M. Then, during each of P samplingperiods, the sampling control circuit 280 provides the state informationfor a selected group of M rows at the same time as the MS signals tocorresponding inputs of the sampling circuit 270. In response thereto,sampling circuit 270 combines the number of active states detected inthe selected group of rows, the number of compare operations performedduring the sampling period, and the duration of the sampling period togenerate the sampling signals for the corresponding row group. Thisprocess is then repeated for all the row groups, where the samplingcontrol circuit 280 selects consecutive row groups during successivesampling periods.

For example, in one exemplary embodiment in which CAM array 310 includes16k rows and the sampling circuit 270 is configured to receive stateinformation for 128 rows at a time, the sampling control circuit 280scans the state information for a selected group of 128 rows and sendsthe collected state information for the selected 128 rows to samplingcircuit 270, which in turn generates the sampling signals for thecorresponding row group. The sampling control circuit 280 then selectsthe next group of 128 rows, and this process is sequentially repeatedfor each of 16k/128=128 row groups. Thus, for this embodiment, theentire CAM array 310 can be scanned by control circuit 280 for stateinformation in 128 sampling periods, with each sampling period providingstate information for 128 CAM rows at a time to sampling circuit 270.Once all of the row groups of the CAM array 310 have been scanned, thesampling control circuit 280 begins scanning the first row group again.In this manner, the state information generated during search operationsin CAM array 310 is continuously scanned 128 rows at a time. Note thatthe length of each sampling period may vary due to the time required toread the active states from a selected row group, and therefore theduration of each sampling period is, for some embodiments, measured interms of a suitable clock signal (e.g., a system clock signal) for theCAM device 300.

FIG. 4A shows a power estimator circuit 400 that is one embodiment ofthe power estimator circuit 120 of FIG. 1. The power estimator circuit400 includes an accumulator 410, a register pipeline 420, a summingcircuit 430, and a compare circuit 440. Accumulator 410 includes aninput to receive the sampling signals provided by sampling circuit 270,and logically combines the sampling signals to generate an estimatedpower profile (EPP) signal indicative of a time averaged power profilefor the selected row group in the CAM array. For some embodiments, eachEPP signal is derived according to the expression EPP=(S*C)/T, where Sis the number of asserted match signals (or active states), C is thenumber of compare operations, and T is the time duration of the samplingperiod. For other embodiments, the EPP signal is derived using theexpression EPP=C*(S+k))/T, where k is a constant indicative of thedynamic power that is consumed if no match signals are asserted. Forsome embodiments, accumulator 410 stores two EPP values: the completedEPP value for the previously selected row group of the CAM array, andthe current EPP value being generated for the currently selected rowgroup of the CAM array.

The register pipeline 420 includes a plurality of registers421(1)-421(m) coupled in series, with the output of each register 421coupled to the input of the next register 421 in the pipeline 420. Theinput of the first register 421(m) receives the EPP signal generated fora corresponding CAM row group by the accumulator 410. Registers 421 canbe any suitable type of register, latch, or flip-flop, and each register421 includes a clock input (<) to receive a pipeline clock signal PCLK.The succession of EPP signals generated by the accumulator 410 can beclocked into consecutive register stages 421 in response to triggeringedges (e.g., either rising edges or falling edges) of PCLK so that theEPP signal output at each of register stages 421 corresponds to adifferent sampling period (e.g., and to a different row group of the CAMarray). For example, after m cycles of PCLK, the first power signalEPP(1) appears at the output of register 421(1), the second power signalEPP(2) appears at the output of register 421(1), and the m^(th) powersignal EPP(m) appears at the output of register 421(m). In this manner,the register pipeline 420 stores a plurality of EPP signals thatrepresent power consumption profiles for m sampling periods. The valueof m can be any integer greater than one. For some embodiments, m=16.

The power signals EPP(1)-EPP(m) are provided from the outputs ofcorresponding registers 421(1)-421(m) to inputs of summing circuit 430,which in response thereto generates a dynamic power estimate (DPE)signal that is indicative of a time-averaged moving estimate of powerconsumption of the CAM device over m sampling periods. The DPE signal isprovided as a search key or look-up value to compare circuit 440.

Compare circuit 440 includes a look-up table (LUT) 441 coupled to anassociated memory element 442. LUT 441 includes an input to receive theDPE signal provided by summing circuit 430, and includes storagelocations to store a plurality of reference signals REF(1)1-REF(p) thatrepresent various predetermined power consumption reference values.Memory element 442, which can implemented using any suitable type ofmemory cells, includes storage locations to store a plurality of valuesof dynamic power throttle control (CTR_DP) signals, each of whichindicates a corresponding decrease in the rate at which throttle controlcircuit 130 of FIG. 1 provides the input string search keys to searchengine 110. The storage locations of memory element 442 are coupled toassociated storage locations in LUT 441 by corresponding selects lineSL.

In operation, LUT 441 compares the value of DPE received from summingcircuit 430 with the reference signals REF(1)1-REF(p) to identify whichreference signal matches or most closely matches the value of DPE. Forsome embodiments, LUT 441 identifies all reference signals having valuesless than the value of the DPE signal, and then selects the greatest ofthe identified reference signals as the matching reference signal. Forone such embodiment, LUT 441 can be implemented using CAM technology.The select line SL associated with the matching reference signal is thenasserted to select a corresponding throttle control signal CTR_DP, whichin turn is output from memory element 442 and provided as CTRL_DP to thethrottle control circuit 130 of FIG. 1. In response to CTR_DP, throttlecontrol circuit 130 adjusts the rate at which bytes of the input stringare provided to search engine 110. By reducing the input data rate ofsearch engine 110, the power consumption of search engine 110 isreduced, thereby allowing the operating temperature of search engine 110to decrease and thus avoid damage resulting from overheating.

For some embodiments, the values of the throttle control signals CTR_DPare percentage values by which the input data rate of search engine 110is to be reduced if the time-averaged power consumption indicated by DPEexceeds a corresponding value of the reference signals stored in the LUT441. For one exemplary embodiment, memory element 442 stores 10 throttlecontrol values, where the value of CTR_DP(1) is 10%, the value ofCTR_DP(2) is 20%, value of CTR_DP(3) is 30%, and so on, where the valueof a last signal CTR_DP(10) is 100%. For such an exemplary embodiment,the values of the corresponding 10 reference signals REF(1)-REF(10)stored in the compare circuit 441 also increase in value such thatREF(1) is the lowest power profile reference value, REF(2) is the nextlowest power profile reference value, and so on, where REF(10) is thehighest power profile reference value, where each increasing powerprofile value indicates that power consumption of the search engine iscreating a larger increase in operating temperature. Of course, forother embodiments, the reference signals REF and throttle values CTR_DPcan be stored in descending order in compare circuit 441 and memoryelement 442, respectively.

For example, if the value of the DPE signal generated by summing circuit430 is less than REF(1), which indicates that the power consumption ofsearch engine 110 is within an acceptable range determined to not pose athreat of overheating, then there is no match found in LUT 441, and theinput data rate of search engine 110 is not adjusted. If the value ofthe DPE signal is greater than REF(1) but less than REF(2), LUT 441identifies REF(1) as the matching entry and asserts the correspondingselect line SL1. In response thereto, memory element 442 outputsCTR_DP(1)=10% to throttle control circuit 130, which in turn decreasesthe input data rate of search engine 110 by 10%. Similarly, if the valueof the DPE signal is greater than REF(2) but less than REF(3), LUT 441identifies REF(2) as the matching entry and asserts the correspondingselect line SL2. In response thereto, memory element 442 outputsCTR_DP(2)=20% to throttle control circuit 130, which in turn decreasesthe input data rate of search engine 110 by 20%. Lastly, if the value ofthe DPE signal is greater than REF(10), LUT 441 identifies REF(10) asthe matching entry and asserts the corresponding select line SL10. Inresponse thereto, memory element 442 outputs CTR_DP(10)=100% to throttlecontrol circuit 130, which in turn halts the flow of input data tosearch engine 110.

The operation of the power management system described abovecontinuously samples the state information and compare operations in thesearch engine, and therefore the power profile generator circuit 270continuously provides a new EPP signal to power estimator circuit 400after each sampling period. As a result, new values of EPP arecontinuously clocked through the register pipeline 420, and summingcircuit 430 is continuously updating the value of DPE to reflect thedynamic nature of the power consumption by the search engine 110.

As described above, power estimator circuit 400 processes the samplingsignals generated by sampling circuit 270 to generate a moving averageof the power consumption of search engine 110 that can be used topredict temperature increases in search engine 110 resulting from itspower consumption. For other embodiments, the power estimator circuit120 can be configured to assign different weights to the EPP valuesprovided to summing circuit 430 by register stages 421 in the pipeline420, for example, to place a greater weight on more recent samplingsignals than on less recent sampling signals.

FIG. 4B shows a power estimator circuit 401 that is another embodimentof the power estimator circuit 120 of FIG. 1. The power estimatorcircuit 401 includes accumulator 410 and a compare circuit 450. Theoperation of accumulator circuit 410 is similar to that described abovewith respect to FIG. 4A. Compare circuit 450 compares the value of EPPprovided by accumulator 410 with a single reference value (REF) togenerate the throttle control signal CTR_DP. The value of REF isselected to correspond to a level of power consumption that is likely tocause performance degradation or damage to the search system resultingfrom overheating. Thus, for the power estimator circuit 401, if thevalue of EPP is greater than REF, then CTR_DP is asserted and causes thethrottle control circuit 130 of FIG. 1 to decrease the input data rateof the search engine 110 by a predetermined amount. Conversely, if thevalue of EPP is not greater than REF, then CTR_DP is de-asserted and thethrottle control circuit 130 does not adjust the input data rate of thesearch engine 110. The power estimator circuit 401 of FIG. 4B is smallerand more simple than the power estimator circuit 400 of FIG. 4A, andthus occupies less silicon area and consumes less power, but providesless flexibility in dynamically adjusting the input data rate to thesearch engine in response to increases in operating temperature. As aresult, the embodiment of FIG. 4B may be suitable for applications inwhich it desirable to decrease the input data rate by a predeterminedamount as long as the estimated power consumption of the search engineexceeds the threshold indicated by REF.

FIG. 4C shows a power estimator circuit 402 that is another embodimentof the power estimator circuit 120 of FIG. 1. The power estimatorcircuit 402 includes accumulator 410 and a translator circuit 460. Theoperation of accumulator circuit 410 is similar to that described abovewith respect to FIG. 4A. Translator circuit 450 processes the value ofEPP provided by accumulator 410 to generate a specific value of CTR_DPthat indicates the amount by which the throttle control circuit 130adjusts (e.g., either increases or decreases) the input data rate ofsearch engine 110. For one embodiment, translator circuit 460 multipliesthe EPP signal by a predetermined throttle factor to generate a value ofCTR_DP that can be used to selectively decrease the input data rate ofthe search engine. Thus, for some embodiments, translator circuit 460performs the functions of register pipeline 420, summing circuit 430,and compare circuit 440 of FIG. 4A.

A general operation of the exemplary embodiments of the search systemdepicted in FIGS. 1-3 is described below with respect to theillustrative flow chart of FIG. 5. First, search data (e.g., search keysconstructed from the input) are provided to the search engine 110 by thethrottle control circuit 130 and compared with data stored in the CAMarray to generate match signals (501). As described above, the matchsignals, which can indicate whether corresponding states of an NFAimplemented in the CAM array are active or inactive, are stored in thematch latches 320. Then, sampling circuit 270 samples the match signalsstored in the match latches and compare information to generate samplingsignals indicating the number of active states (e.g., the number ofasserted match signals), the number of compare operations performed, andthe duration of the sampling period (502). For some embodiments,sampling control circuit 280 sequentially selects successive group ofrows of the CAM array to be sampled by sampling circuit 270.

The power estimator circuit 130 uses the sampling signals to generate anestimated power profile signal that indicates a time averaged value ofpower consumption of the search engine (503), and then compares theestimated power profile signal with one or more reference signals togenerate a dynamic power control signal (504). The reference signalscorrespond to different power profile values that are associated withvarious predicted increases in operating temperature. Then, the throttlecontrol circuit 130 selectively adjusts the input data rate of thesearch engine in response to the dynamic power control signal to managepower consumption so that resulting operating temperature increases donot degrade performance and/or damage the search system (505). Forexample, if the dynamic power control signal indicates that the movingaverage of power consumption in the search engine, if unabated, islikely to cause an unacceptable increase in operating temperature, thethrottle control circuit 130 decreases the input data rate of the searchengine until the operating temperature decreases to an acceptable level.

FIG. 6A shows CAM array 310 coupled to sampling circuit 270 inaccordance with another embodiment. For the exemplary embodiment of FIG.6A, each of match lines ML1-MLn is coupled to a corresponding input of afirst port of sampling circuit 270 so that the match signals generatedon the match lines during compare operations can be provided in parallelas match state information to sampling circuit 270, which as mentionedabove includes a counter (not shown for simplicity) that counts thenumber of active states generated in the CAM array 310 during thesampling period. In addition, sampling circuit 270 includes a secondinput port to receive a compare signal (CMP) from comparand register230. For some embodiments, the compare signal CMP is asserted uponcommencement of each compare operation in CAM array 310, and anassociated counter (not shown for simplicity) provided within samplingcircuit 270 counts the number of times that CMP is asserted to determinehow many compare operations were performed in the CAM array during thesampling period. For another embodiment, CMP can be generated by anothersuitable circuit within and/or associated with CAM array 310.

Although able to provide the match results from all N rows of the CAMarray to sampling circuit 270 at the same time, the exemplary embodimentdepicted in FIG. 6A requires a signal line and input to sampling circuit270 for each row of the CAM array, which undesirably consumes asignificant amount of valuable silicon area. Thus, for actualembodiments, sampling circuit 270 includes a predetermined number M ofinputs that are selectively coupled to one of P groups of M rows at atime by a suitable control circuit, where M=N/P. For simplicity, thecontrol circuit, which can be a state machine, multiplexer, or othersuitable control circuitry, is not shown in FIG. 6A. In this manner, thecontrol circuit sequentially scans each of the P group of M rows forstate information and sends the collected state information for theselected group of M rows to sampling circuit 270 during one of Psampling periods. In response thereto, sampling circuit 270 combines thenumber of active states detected in the selected group of rows with thenumber of compare operations performed and the duration of the samplingperiod to generate a sampling signal for the selected row group. Thisprocess is then sequentially repeated for the remaining row groups,where the sampling circuit 270 generates a sampling signal for each rowgroup.

FIG. 6B shows CAM array 310 coupled to sampling circuit 270 inaccordance with another embodiment. For the exemplary embodiment of FIG.6B, each of match latches 320 includes a read port coupled to a matchbus (MBUS) that can be used to provide match state information frommatch latches 320 to the first port of sampling circuit 270. For someembodiments, MBUS can be implemented as a complementary pair of matchbit lines and the match latches 320 can be sequentially selected (e.g.,using word lines WL, dedicated match latch word lines, or other suitableselection signals) for outputting match state information to thesampling circuit 270. In addition, the second port of sampling circuit270 is coupled to receive the compare signal (CMP) from comparandregister 230.

For other embodiments, the state information stored in rows of the CAMarray (e.g., in match latches 320) can be read from the array inparallel using the array's bit lines. For example, FIG. 7 shows aportion 700 of a CAM device that is one embodiment of the CAM device 200of FIG. 2. CAM device 700 is shown to include a CAM array 710, addressdecoder 220, comparand register 230, read/write circuit 240, andpriority encoder 250. CAM array 710, which is one embodiment of CAMarray 210 of FIG. 2, includes a plurality of CAM cells 312 arranged in anumber of rows (R1-Rn) and columns (C1-Cn), includes a number of matchlatches 320(1)-320(n), and includes a number of state information gatingcircuits 330(1)-330(n). For the exemplary embodiment of FIG. 7, CAMarray 710 includes the same number of rows and columns. However, forother embodiments, CAM array 710 may include a greater number of rowsthan columns, as discussed below with respect to FIG. 12. The CAM cells312 can be any suitable type of CAM cell including, for example, binary,ternary, and/or quaternary CAM cells.

Each row of CAM array 710 includes a plurality of CAM cells 312, a matchlatch 320, and a state information gating circuit 330. Morespecifically, each row of CAM cells 312 is coupled to address decoder220 via a corresponding word line WL, and is coupled to an associatedmatch latch 320 via a corresponding match line ML. The word lines areselectively driven by address decoder 220 in response to an address toselect one or more of rows of CAM cells 312 for writing or reading in awell-known manner. The match lines ML indicate match results of acompare operation performed in CAM array 710. The match latches 320,which can be any suitable register, latch, flip-flop, SRAM cell, DRAMcell, or other memory element, store the match results provided on thematch lines ML and provide the match results to priority encoder 250.Although not shown for simplicity, for some embodiments, each matchlatch 320 can include a clock input to receive a match latch signal thatcauses the match latches 320 to latch the match signals provided on thematch lines ML.

Each column of CAM cells 312 is coupled to the comparand register 230via a complementary comparand line pair CL/ CL, and to the read/writecircuit 240 via a complementary bit line pair BL/ BL. The comparandregister 230 includes a plurality of drivers (not shown for simplicity)that provide complementary comparand data to columns of CAM cells 312during compare or search operations via the comparand line pairs CL/ CL.The read/write circuit 240 provides/receives complementary CAM datato/from the columns of CAM cells 312 via the bit line pairs BL/ BL. Morespecifically, read/write circuit 240 includes a plurality of well-knownsense amplifiers (not shown for simplicity) to read data read from thebit line pairs BL/ BL, and includes a plurality of well-known writedrivers (not shown for simplicity) to write data into the CAM array 710via the bit line pairs BL/ BL. Read/write circuit 240 is coupled to thesampling circuit 270 (not shown in FIG. 7 for simplicity) via a numberof state data line pairs SDL/ SDL, where each state data line pair isassociated with the bit line pair BL/ BL in a corresponding column ofCAM array 710.

In accordance with the present embodiments, the state information gatingcircuit 330 in each CAM row includes a first port coupled to the matchlatch 320 in the row, and includes a second port coupled to the bit linepair of an associated column of the CAM array. More specifically, foreach given CAM row, the gating circuit 330 is coupled to a data port ofthe match latch 320 in the given row, and is also coupled to the bitline pair BL/ BL of the associated column by a corresponding save stateand restore bit line pair BL_SSR/ BL_SSR. For example, the gatingcircuit 330(1) in the first row (R1) of the array is coupled to thematch latch 320(1) in the first row (R1) and is coupled to the bit linepair BL/ BL in the first column (C1), the gating circuit 330(2) in thesecond row (R2) of the array is coupled to the match latch 320(2) in thesecond row (R2) and is coupled to the bit line pair BL/ BL in the secondcolumn (C2), and so on, where the gating circuit 330(n) in the n^(th)row (Rn) of the array is coupled to the match latch 320(n) in the n^(th)row (Rn) and is coupled to the bit line pair BL/ BL in the n^(th) column(Cn).

Each of state information gating circuits 330(1)-330(n) also includes acontrol input to receive a save state and restore enable signal SSR_ENthat can be used to selectively couple the match latches 320(1)-320(n)in respective rows R1-Rn to the bit line pairs BL/ BL in respectivecolumns C1-Cn. In this manner, the state information gating circuits 330allow state information (e.g., match results) stored for rows of CAMarray 310 to be transposed onto columns of the CAM array and thenprovided in parallel to the sampling circuit 270 (not shown in FIG. 7for simplicity) using the CAM array's bit line pairs. More specifically,state information for rows R1-Rn that is stored in the match latches320(1)-320(n) can be simultaneously driven onto the bit line pairs BL/BL from the SSR bit line pairs BL_SSR/ BL_SSR by respective gatingcircuits 330(1)-330(n) and thereafter read from the CAM array 710 inparallel by the sense amplifiers (not shown for simplicity) providedwithin read/write circuit 240, which in turn can output the stateinformation in parallel from the CAM array 710 to the sampling circuit270.

An exemplary operation for reading state information from the CAM array710 into sampling circuit 270 is depicted in FIG. 8. First, the controlsignal SSR_EN is driven to a read state that allows gating circuits330(1)-330(n) to read the state information stored in the match latches320(1)-320(n) and transpose the state information in parallel onto thebit line pairs BL/ BL in respective columns C1-Cn via correspondingsignal line pairs BL_SSR/ BL_SSR (801). For some embodiments, thecontrol signal SSR_EN can be driven to a read state by sampling controlcircuit 280 (see also FIG. 3). After being transposed onto the bit linepairs BL/ BL, the state information is then read in parallel by senseamplifiers within read/write circuit 240 (802). Next, read/write circuit240 outputs the state information from the CAM array 710 to the samplingcircuit 270 in parallel via state data line pairs SDL/ SDL (803), andthe state information is latched into the sampling circuit 270 (804).

FIG. 9 shows a more detailed portion 900 of CAM array 710 in accordancewith some embodiments. CAM portion 900 includes a row 901 and a column902. The row 901 includes a binary CAM cell 910, a match latch 920, anSSR read circuit 930, an SSR write circuit 940, and a well-known passgate 950. For simplicity, only one CAM cell 910 is shown in FIG. 9,although for actual embodiments, CAM row 901 and CAM column 902 caninclude any suitable number of CAM cells. Further, CAM cell 910 isdepicted in FIG. 9 as a well-known binary CAM cell for simplicity.However, for actual embodiments, CAM cell 910 can be any suitable typeof CAM cell including, for example, ternary and quaternary CAM cells.

As shown in FIG. 9, CAM cell 910 includes an SRAM cell 911 and a comparecircuit 912. SRAM cell 911, which is well-known, is coupled to acomplementary bit line pair BL/ BL associated with corresponding column902 of the CAM array, and is coupled to a word line associated with thecorresponding row 901. As known in the art, a data bit D is written toSRAM cell 911 by asserting the word line high (e.g., to VDD) and drivinga value of D and its complement D on BL and BL, respectively. Comparecircuit 912, which is well-known, is coupled to SRAM cell 911, to amatch line ML for the row 901, and to a complementary comparand linepair CL/ CL associated with the corresponding column 902. Comparecircuit 912 compares a comparand bit (e.g., a bit of the search key)with the data bit D stored in the cell 911, and indicates the matchresults on the match line ML. The match results on ML are provided toand stored in the match latch 920.

Match latch 920, which is one embodiment of match latch 320 of FIG. 3,is shown in FIG. 9 as a well-known SRAM cell that stores a match bit Mand its complement M at nodes 921 and 922, respectively. Match latch 920is coupled to the word line WL and coupled to a match bit line pair MBL/MBL to enable testing functions, as well as to enable conventionalserial read and write operations. Node 921 is selectively coupled to therow's match line ML by pass gate 950 in response to a latch clock signalLCLK, where LCLK and its complement LCLK are provided to complementarycontrol terminals of pass gate 950. In this manner, during compareoperations, the data node 921 of match latch 920 is driven to the logicstate indicated on the match line ML by pass gate 950, which causes thecomplementary data node 922 of match latch 920 to be driven to thecomplementary logic state. Although not shown for simplicity, for someembodiments, a suitable well-known gating circuit can be provided on thematch line ML selectively de-couple the CAM cells 910 from the matchlatch 920 (e.g., during ML pre-charging operations).

In accordance with present embodiments, the match latch 920 in row 901is coupled to the bit line pair BL/ BL of column 902 via SSR bit linepair BL_SSR/ BL_SSR so that state information can be read from matchlatch 920 to sampling circuit 270 (not shown in FIG. 9 for simplicity)using the column's bit line pair. As described in more detail below,read operations from match latch 920 to the bit line pair BL/ BL arefacilitated by SSR read circuit 930 in response to an SSR read enablesignal SSR_REN, and write operations (e.g., from an external device)from the bit line pair BL/ BL to match latch 920 are facilitated by SSRwrite circuit 940 in response to an SSR write enable signal SSR_WEN.Together, SSR read circuit 930 and SSR write circuit 940 form oneembodiment of state information gating circuits 330 of FIG. 7, andenable signals SSR_REN and SSR_WEN form one embodiment of control signalSSR_EN of FIG. 7.

More specifically, SSR read circuit 930 includes driver circuits 931-932and NMOS transistors 933-934. NMOS transistor 933 is coupled betweenBL_SSR and ground potential, and has a gate selectively coupled to datanode 921 of match latch 920 by driver circuit 931 in response toSSR_REN. NMOS transistor 934 is coupled between BL_SSR and groundpotential, and has a gate selectively coupled to complementary data node922 of match latch 920 by driver circuit 932 in response to SSR_REN. Toread state information from match latch 920 to the sampling circuit 270via bit line pair BL/ BL, the word line WL is de-asserted (e.g., tologic low) to isolate data stored in CAM cell 910 from the bit lines BLand BL during the read state information operation, the bit lines BL andBL are pre-charged (e.g., toward VDD), and SSR_REN is asserted (e.g., tologic high) to turn on driver circuits 931-932. Driver circuits 931 and932 drive the gates of corresponding transistors 933 and 934 with thematch bit M and the complementary match bit M, respectively. In responsethereto, transistors 933 and 934 pull respective signal lines BL_SSR andBL_SSR to opposite logic states, which in turn drive respective signallines BL and BL to opposite logic states to achieve a differentialvoltage indicative of the state information stored in the match latch920. In this manner, the state information is transposed from row 901 ofthe CAM array to column 902 of the CAM array, thereby facilitating theparallel reading of state information from a number N of rows to thesampling circuit 270 via a corresponding number N of columns.

For example, if M=1 and M=0, then driver circuit 931 drives the gate oftransistor 933 to logic high (e.g., toward VDD) and driver circuit 932drives the gate of transistor 934 to logic low (e.g., toward groundpotential). In response thereto, transistor 933 turns on and pullsBL_SSR and BL to logic low, and transistor 934 turns off and does notdischarge BL_SSR or BL. In this manner, BL remains in its pre-chargedlogic high state and BL is discharged to logic low, thereby creating adifferential voltage between BL and BL representative of the M=1 valuestored in the match latch 920. Conversely, if M=0 and M=1, then drivercircuit 931 drives the gate of transistor 933 to logic low and drivercircuit 932 drives the gate of transistor 934 to logic high. In responsethereto, transistor 933 turns off and does not discharge BL_SSR or BL,and transistor 934 turns on and discharges BL_SSR and BL. In thismanner, BL is discharged to logic low and BL remains in its pre-chargedlogic high state, thereby creating a differential voltage between BL andBL representative of the M=0 value stored in the match latch 920.

SSR write circuit 940 includes driver circuits 941-942 and NMOStransistors 943-944. NMOS transistor 943 is selectively coupled betweenBL_SSR and data node 921 of match latch 920 by driver circuit 941 inresponse to SSR_WEN. NMOS transistor 944 is selectively coupled betweenBL_SSR and complementary data node 922 of match latch 920 by drivercircuit 942 in response to SSR_WEN. To write state information from anexternal device to the match latch 920 via bit line pair BL/ BL, theword line WL is de-asserted (e.g., to logic low) to isolate data storedin CAM cell 910 from the bit lines BL and BL during the write stateinformation operation, the bit lines BL and BL are driven to adifferential voltage indicative of the match value M to be written tomatch latch 920 by read/write circuit 240, and SSR_WEN is asserted(e.g., to logic high) to turn on driver circuits 941-942 and to turn onNMOS transistors 943-944. Thereafter, driver circuit 941 drives thelogic value provided on BL to data node 921 of match latch 920 viaBL_SSR, and driver circuit 942 drives the logic value provided on BL tocomplementary data node 922 of match latch 920 via BL_SSR.

Note that when SSR read circuit 930 is not being used to transfer stateinformation from match latch 920 to the external memory via the array'sbit lines, the signal SSR_REN is de-asserted to isolate match latch 920from the bit lines. Similarly, when SSR write circuit 940 is not beingused to transfer state information to match latch 920 from the externalmemory via the array's bit lines, the signal SSR_WEN is de-asserted toisolate match latch 920 from the bit lines.

FIG. 10A shows a pass gate 1000 that is one embodiment of pass gate 950of FIG. 9. Pass gate 1000 includes an AND gate 1001, a CMOS inverter1002, and NMOS transistors 1011-1014. Referring also to FIG. 9, the ANDgate 1001 includes a first input coupled to the match line ML, a secondinput to receive a data clock signal DCLK, and an output to generate agated match signal MG. Transistor 1012 is coupled between node 922 ofmatch latch 920 and an intermediate pass gate node N1, and has a gate toreceive the gated match signal MG. Transistor 1011 is coupled betweennode 921 of match latch 920 and intermediate pass gate node N1, and hasa gate to receive a complemented gated match signal MG generated inresponse to MG by the CMOS inverter 1002. Transistors 1013 and 1014 arecoupled between intermediate node N1 and ground potential, and havegates to receive LCLK and a state latch enable signal EN_SL,respectively. For other embodiments, transistor 1014 can be omitted.

Pass gate 1000 transfers the match signal on the match line ML to thematch latch 920 as follows. Prior to compare operations in row 900, DCLKis de-asserted, which causes AND gate 1001 to isolate the match line MLfrom the match latch 920. Further, LCLK and EN_SL are de-asserted toturn off respective transistors 1013 and 1014, thereby isolating thematch latch 920 from ground potential. Once the match results aregenerated on the match line ML, DCLK is asserted to enable the AND gate1001 to output the match signal on ML as the gated match signal MG, andLCLK and EN_SL are asserted to turn on transistors 1013 and 1014. Forexample, if the match signal is logic high (e.g., indicating a matchcondition), the AND gate 1001 drives MG to logic high, and in responsethereto CMOS inverter 1002 drives MG to logic low. The logic high stateof MG turns on transistor 1012, which in turn pulls node 922 of matchlatch 920 low toward ground potential through transistors 1013 and 1014.In this manner, M is driven to logic low, which in turn drives node 921to logic high, thereby storing M=1 in the match latch. The logic lowstate of MG turns off transistor 1011 and isolates node 921 of the matchlatch 920 from ground potential. Conversely, if the match signal islogic low (e.g., indicating a mismatch condition), the AND gate 1001drives MG to logic low, and in response thereto CMOS inverter 1002drives MG to logic high. The logic high state of MG turns on transistor1011, which in turn pulls node 921 of match latch 920 low toward groundpotential through transistors 1013 and 1014. In this manner, M is drivento logic low, which in turn drives node 922 to logic high, therebystoring M=0 in the match latch. The logic low state of MG turns offtransistor 1012 and isolates node 922 of the match latch 920 from groundpotential.

FIG. 10B shows an SSR read circuit 1030 that is another embodiment ofSSR read circuit 930 of FIG. 9. SSR read circuit 1030 includes all theelements of SSR read circuit 930, and an additional NMOS transistor 935coupled between the drains of NMOS transistors 933-934 and groundpotential. Transistor 935, which has a gate to receive the controlsignal SSR_REN, provides isolation between 933-934 and ground potential.

FIG. 11A shows a more detailed portion 1100 of CAM array 710 inaccordance with some embodiments. CAM portion 1100 includes a row 1101and a column 1102. The row 1101 includes CAM cell 910, a master matchlatch 1120M, a slave match latch 1120S, SSR read circuit 930, SSR writecircuit 940, and pass gate 1000 (see also FIG. 10A). CAM row 1101 issimilar to CAM row 901 of FIG. 9, except that match latch 920 isreplaced by master/slave match latches 1120M and 1120S, which togetherform a flip-flop that is another embodiment of match latch 920 of FIG.9. The flip-flop can store the match results for the corresponding CAMrow for a full clock cycle (e.g., as opposed to a single latch thatstores the results for only one phase of the clock signal), andtherefore the match latches discussed above with respect to theexemplary embodiments FIGS. 7 and 9 are typically implemented asflip-flops in the manner depicted in FIG. 11A. Master match latch 1120Mstores a master match bit M_(M) at its node 921M and stores thecomplement MM at its node 922M, and slave match latch 1120S stores aslave match bit M_(S) at its node 921S and the complement MS at its node922S. In this manner, the master match latch 1120M stores the initialmatch state information, and the slave match latch 1120S stores thefinal match state information.

The individual configuration and operation of master match latch 1120Mand slave match latch 1120S are similar to that described above withrespect to match latch 920 of FIG. 9, except that master match latch1120M is connected directly to SSR write circuit 940, and slave matchlatch 1120S is connected directly to SSR read circuit 930. As a result,state information can be restored from an external device to mastermatch latch 1120M via SSR write circuit 940, and state information canbe saved or read to an external device (e.g., such as sampling circuit270) from slave match latch 1120S via SSR read circuit 930, as describedin more detail below.

For simplicity, only one CAM cell 910 is shown in FIG. 11A, although foractual embodiments, CAM row 1101 and CAM column 1102 can include anysuitable number of CAM cells. As mentioned above with respect to FIG. 9,CAM cell 910 can be any suitable type of CAM cell including, forexample, binary, ternary and/or quaternary CAM cell.

As shown in FIG. 11A, the master match latch 1120M is coupled to thepass gate 1000 in the manner described above with respect to FIG. 10A,and is also coupled to the slave match latch 1120S. More specifically,node 921M of master match latch 1120M is coupled to the gate oftransistor 1012S, and node 922M of master match latch 1120M is coupledto the gate of transistor 1011S so that the match bit M_(M) stored inthe master match latch 1120M can be transferred to and stored in theslave match latch 1120S as MS in response to the complemented latchclock signal LCLK provided to the gate of transistor 1013S. Together,transistors 1011S-1014S form a pass gate 1110 that selectively transfersthe match data M_(M) stored in the master match latch 1120M to the slavematch latch 1120S in response to LCLK.

During compare operations, the match results generated on the match lineML are first driven into the master match latch 1120M during a firstphase of LCLK, and are then transferred to the slave match latch 1120Sduring a second phase of LCLK. More specifically, after match resultsare generated on the match line ML in response to compare operations inthe CAM cells 910, DCLK is asserted and allows pass gate 1000 to drivethe resulting match signal on the match line ML as the match bit M_(M)into master match latch 1120M in response to a triggering edge of LCLK(e.g., in the manner described above with respect to FIG. 10A). Then, inresponse to the triggering edge of LCLK, which for some embodiments is180 degrees out of phase with respect to LCLK, transistor 1013S turns onand allows the match bit M_(M) stored in master match latch 1120M to bedriven into the slave match latch 1120S as the match bit M_(S), therebytransferring the match bit from the master match latch 1120M to theslave match latch 1120S one-half cycle after the match results arestored in the master match latch 1120M.

Then, during flow switch operations, the master match latch 1120M andthe slave match latch 1120S can be separately used to write stateinformation into the CAM row 1101 and to read state information from theCAM row 1101, respectively. More specifically, to read state informationfrom CAM row 1101 to an external device such as sampling circuit 270,the complementary match bits M_(S) and Ms are provided from slave matchlatch 1120S to SSR read circuit 930, which in turn drives the match bitonto the bit line pair BL/ BL via the SSR bit line pair BL_SSR/ BL_SSRin response to SSR_REN, as described above with respect to FIG. 9. Torestore state information from the external device to the CAM row 1101,the bit lines BL and BL are driven to a differential voltage indicativeof the externally stored match value M by read/write circuit 240, andSSR_WEN is asserted to enable SSR write circuit 940 to write the matchvalue received from the bit line pair BL/ BL via the SSR bit line pairBL_SSR/ BL_SSR to the master match latch 1120M.

For another embodiment, an additional latch (e.g., SRAM cell) can beadded to each CAM row and used as a cache memory to facilitate thetransfer of state information between the CAM array and the externaldevice in a manner that virtually eliminates array down-time associatedwith flow switch operations. For example, FIG. 11B shows a simplifiedfunctional block diagram of a portion 1150 of a CAM row that is amodified embodiment of CAM row 1101 of FIG. 11A. CAM row 1150 is shownto include pass gate 1000, SSR read circuit 930, SSR write circuit 940,master match latch 1120M, and slave match latch 1120S of CAM row 1101,and additionally includes a cache match latch 1120C and switchesSW1-SW2. Together, master match latch 1120M and slave match latch 1120Sform a match flip-flop 1151. Pass gate 1000 has an input to receive thematch results from the match line ML, and includes an output to providethe gated match signal MG to a first input of switch SW1, which includesa second input to receive a cached match signal M_(C) from cache matchlatch 1120C, a first output coupled to master match latch 1120M, asecond output coupled to SSR read circuit 930, and a control terminal toreceive a corresponding first switch control signal CTR_SW1. The outputof master match latch 1120M provides the latched match bit M_(M) toslave match latch 1120S, which in turn has an output coupled to a firstinput of switch SW2. The second switch SW2 includes a second coupled tothe output of SSR write circuit 940, an output coupled to an input ofcache match latch 1120C, and a control terminal to receive acorresponding second switch control signal CTR_SW2. For simplicity, theCAM cell 910, bit line pairs, and SSR bit line pair associated with row1150 are not shown in FIG. 11B.

As mentioned above, the exemplary CAM array 710 depicted in FIG. 7includes the same number of rows and columns, and therefore there is aone-to-one correspondence between the bit line pairs BL/ BL in columnsof the array and the SSR bit line pairs BL_SSR/ BL_SSR in rows of thearray that allows state information stored in rows of the CAM array(e.g., in match latches 320(1)-320(n)) to be simultaneously transposedonto columns of the CAM array and read from the array via the bit linepairs BL/ BL in parallel in a single operation. However, actualembodiments of CAM array 210 of FIG. 2 typically a much greater numberof rows than columns. For such embodiments, the bit line pair BL/ BL ineach column is selectively coupled to a plurality of different rows viagating circuits 330 so that match information can be transferred to thesampling circuit 270 and a number Z of row groups in Z successiveoperations. For example, in one exemplary embodiment of CAM array 210that includes X=256 rows and Y=64 columns, the rows of the array aregrouped into Z=X/Y=4 groups of 64 rows. Within each row group, each ofthe 64 rows is coupled to a corresponding one of the 64 columns via theSSR bit lines and gating circuits 330. During save state and restoreoperations, data is transferred in parallel between the external statememory and a selected group of 64 rows using the bit lines correspondingto the 64 columns.

FIG. 12 depicts the multiplexed interconnections between the rows andcolumns of such an exemplary embodiment. CAM block 1200, which is oneembodiment of CAM array 210 of FIG. 2, includes X=256 rows R0-R255 andY=64 columns C0-C63, wherein the rows are grouped into Z=X/Y=256/64=4row groups 1210(0)-1220(3). Thus, the first row group 1210(0) includesthe first 64 rows R0-R63, the second row group 1210(1) includes thesecond 64 rows R64-R127, and so on, where the last row group 1210(3)includes the last 64 rows R192-R255. For simplicity, the CAM cells, wordlines WL, comparand lines CL, match lines ML, comparand register 230,and read/write circuit 240 are not shown in FIG. 12. For the exemplaryembodiment of FIG. 12, state information can be transferred from CAMblock 1200 and to the sampling circuit 270 in 4 transfer cycles, whereeach transfer cycle facilitates the parallel transfer of stateinformation to the sampling circuit 270 from the 64 rows of acorresponding row group 1210 via the bit line pairs in the 64 columnsC0-C63. Each of row groups 1210(0)-1210(3) can be selected for stateinformation transfers by selectively asserting the SSR enable signals(e.g., SSR_WEN and SSR_REN) provided to the gating circuits within therow group. For some embodiments, the SSR enable signals can bemultiplexed to selectively enable state information transfers for eachrow group 1210.

While particular embodiments have been shown and described, it will beobvious to those skilled in the art that changes and modifications maybe made without departing from this disclosure in its broader aspectsand, therefore, the appended claims are to encompass within their scopeall such changes and modifications as fall within the true spirit andscope of this disclosure. Further, it should be noted that the variouscircuits disclosed herein may be described using computer aided designtools and expressed (or represented), as data and/or instructionsembodied in various computer-readable media, in terms of theirbehavioral, register transfer, logic component, transistor, layoutgeometries, and/or other characteristics. Formats of files and otherobjects in which such circuit expressions may be implemented include,but are not limited to, formats supporting behavioral languages such asC, Verilog, and VHDL, formats supporting register level descriptionlanguages like RTL, and formats supporting geometry descriptionlanguages such as GDSII, GDSIII, GDSIV, CIF, MEBES and any othersuitable formats and languages.

1. A search system including a content addressable memory (CAM) device,comprising: a CAM array having a plurality of rows, each row including anumber of CAM cells coupled to a match latch, the match latch to storematch signals generated during compare operations; a sampling circuit,coupled to the CAM array, to generate sampling signals indicating howmany of the match signals are asserted during a sampling period; and anaccumulator circuit to generate an estimated power profile signal inresponse to the sampling signals, wherein the estimated power profilesignal indicates a time-averaged power profile of the CAM array.
 2. Thesearch system of claim 1, wherein the accumulator circuit is configuredto logically combine the sampling signals during the sampling period togenerate the estimated power profile signal.
 3. The search system ofclaim 1, further comprising: a compare circuit to compare the estimatedpower profile signal with one or more reference values to generate adynamic power control signal.
 4. The search system of claim 3, furthercomprising: a throttle control circuit to selectively adjust an inputdata rate at which an input string is provided to the CAM array inresponse to the dynamic power control signal.
 5. The search system ofclaim 4, wherein the throttle control circuit is configured to decreasethe input data rate if the dynamic power control signal exceeds aselected one of the one or more reference values.
 6. The search systemof claim 5, wherein the throttle control circuit is configured todecrease the input data rate until the dynamic power control signalfalls below the selected reference value.
 7. The search system of claim5, wherein the throttle control circuit is configured to increase theinput data rate after the dynamic power control signal falls below theselected reference value.
 8. The search system of claim 5, wherein theselected reference value corresponds to a predicted temperature increaseof the CAM device resulting from power consumption.
 9. The search systemof claim 3, wherein the compare circuit comprises: a look-up tablehaving an input to receive the estimated power profile signal and havinga plurality of locations for storing a plurality of different referencevalues; and a memory element coupled to the look-up table and having aplurality of locations for storing a plurality of different values ofthe dynamic power control signal.
 10. The search system of claim 3,further comprising: a pipeline coupled to the accumulator circuit andincluding a plurality of serially connected register stages, whereineach register stage includes an output to provide the estimated powerprofile signal for a corresponding time period; and a summing circuit tocombine the estimated power profile signals.
 11. The search system ofclaim 1, wherein the sampling signals further indicate the numbercompare operations performed during the sampling period.
 12. The searchsystem of claim 1, wherein the sampling circuit comprises: a firstcounter circuit having an input port to receive the match signals fromthe match latches, the first counter circuit being configured to add thematch signals to determine the number of match signals asserted duringthe sampling period; and a second counter circuit having an input portto receive a compare enable signal, the second counter circuit beingconfigured to count the number of compare operations performed duringthe sampling period.
 13. A content addressable memory (CAM) device,comprising: a CAM array having a plurality of rows, each row including anumber of CAM cells coupled to a match latch, the match latch to storematch signals generated during compare operations; a sampling circuit,coupled to the CAM array, to generate sampling signals indicating howmany of the match signals are asserted during a sampling period; and apower estimator circuit to generate a dynamic power control signal inresponse to the sampling signals, wherein the dynamic power controlsignal corresponds to a time-averaged power profile of the CAM array.14. The CAM device of claim 13, further comprising: a throttle controlcircuit, coupled to the CAM array, to selectively adjust an input datarate at which an input string is provided to the CAM array in responseto the dynamic power control signal.
 15. The CAM device of claim 14,wherein the throttle control circuit is configured to decrease the inputdata rate if the dynamic power control signal exceeds a reference value.16. The CAM device of claim 15, wherein the throttle control circuit isconfigured to decrease the input data rate until the dynamic powercontrol signal falls below the reference value.
 17. The CAM device ofclaim 15, wherein the throttle control circuit is configured to increasethe input data rate after the dynamic power control signal falls belowthe reference value.
 18. The CAM device of claim 15, wherein thereference value corresponds to a predicted temperature increase of theCAM device resulting from power consumption.
 19. The CAM device of claim13, wherein the sampling signals further indicate the number compareoperations performed during the sampling period.
 20. The CAM device ofclaim 13, wherein the sampling circuit comprises: a first countercircuit having an input port to receive the match signals from the matchlatches, the first counter circuit being configured to add the matchsignals to determine the number of asserted match signals during thesampling period; and a second counter circuit having an input port toreceive a compare enable signal, the second counter circuit beingconfigured to count the number of compare operations performed duringthe sampling period.
 21. The CAM device of claim 13, wherein the powerestimator circuit comprises: an accumulator circuit having an input toreceiving the sampling signals and having an output to generate anestimated power profile signal; and a compare circuit to compare theestimated power profile signal with one or more reference values togenerate the dynamic power control signal.
 22. The CAM device of claim21, wherein the compare circuit comprises: a look-up table having aninput to receive the estimated power profile signal and having aplurality of locations for storing a plurality of different referencevalues; and a memory element coupled to the look-up table and having aplurality of locations for storing a plurality of different values ofthe dynamic power control signal.
 23. The CAM device of claim 21,wherein the power estimator circuit further comprises: a pipelinecoupled to the accumulator circuit and including a plurality of seriallyconnected register stages, wherein each register stage includes anoutput to provide the estimated power profile signal for a correspondingtime period; and a summing circuit to combine the estimated powerprofile signals.
 24. The CAM device of claim 13, wherein the powerestimator circuit comprises: an accumulator circuit having an input toreceiving the sampling signals and having an output to generate anestimated power profile signal; and a translator circuit to multiply theestimated power profile signal with a predetermined throttle factor togenerate the dynamic power control signal.
 25. A method of dynamicallyadjusting power consumption of a content addressable memory (CAM)device, comprising: generating match signals during compare operationsperformed in the CAM device; sampling the match signals to generatesampling signals indicating how many of the match signals are assertedduring a sampling period; and generating an estimated power profilesignal in response to the sampling signals, wherein the estimated powerprofile signal indicates a time-averaged power profile of the CAMdevice.
 26. The method of claim 25, further comprising: selectivelyadjusting an input data rate at which an input string is provided to theCAM device in response to the estimated power profile signal.
 27. Themethod of claim 26, wherein selectively adjusting the input data ratecomprises: comparing the estimated power profile signal to a referencevalue; and decreasing the input data rate when the estimated powerprofile signal exceeds the reference value.
 28. The method of claim 27,further comprising: increasing the input data rate when the dynamicpower control signal falls below the reference value.
 29. The method ofclaim 27, wherein the reference value corresponds to a predictedincrease in operating temperature resulting from power consumption ofthe CAM device.
 30. The method of claim 26, wherein selectivelyadjusting the input data comprises: comparing the estimated powerprofile signal to a number of reference values; selecting acorresponding one of a number of power control signals in response tothe comparing; and selectively decreasing the input data rate inresponse to the selected power control signal.
 31. The method of claim25, wherein the number of match signals asserted during the samplingperiod is indicative of the power consumption of the CAM device.
 32. Themethod of claim 25, wherein the sampling signals further indicate thenumber of compare operations performed during the sampling period. 33.The method of claim 32, wherein the estimated power profile signal (EPP)is expressed as EPP=(S*C)/T, where S is the number of match signalsasserted during the sampling period, C is the number of compareoperations performed during the sampling period, and T is the timeduration of the sampling period.
 34. The method of claim 25, wherein thesampling signals further indicate the number of clock signals elapsedduring the sampling period.